package com.spzx.order.api;

import com.spzx.common.core.constant.SecurityConstants;
import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import com.spzx.order.api.domain.OrderInfo;
import com.spzx.order.api.fallback.OrderInfoFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @ClassName OrderInfoFeignClient
 * @Author 波
 * @Date 2024/8/14 21:04
 */
@FeignClient(contextId = "orderInfoFeignClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = OrderInfoFeignClientFallbackFactory.class)
public interface OrderInfoFeignClient {
    @GetMapping("orderInfo/getByOrderNo/{orderNo}")
    public R<OrderInfo> getByOrderNo(@PathVariable("orderNo") String orderNo, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
